/********************************************************************************
*                 Copyright (C) 2011 - Las Venturas Playground                  *
*                      http://iv-mp.nl | http://lvp-iv.com                      *
*                                                                               *
*    This program is free software: you can redistribute it and/or modify       *
*    it under the terms of the GNU General Public License as published by       *
*    the Free Software Foundation, either version 3 of the License, or          *
*    (at your option) any later version.                                        *
*                                                                               *
*    This program is distributed in the hope that it will be useful,            *
*    but WITHOUT ANY WARRANTY; without even the implied warranty of             *
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
*    GNU General Public License for more details.                               *
*                                                                               *
*    You should have received a copy of the GNU General Public License          *
*    along with this program.  If not, see <http://www.gnu.org/licenses/>.      *
*                                                                               *
*********************************************************************************
*                                                                               *
*  Las Venturas Playground - callbacks/onPlayerConnect.nut                      *
*                                                                               *
*  The onPlayerConnect callback is located here.                                *
*                                                                               *
********************************************************************************/

/**
 * This event is called when a user connects to the server.
 *
 * @param playerid The playerid that joined the server.
 */
function onPlayerConnect (playerid)
{
    sendMessageToAll ("* " + getPlayerName (playerid) + " has joined LVP:IV.", COLOR_GREY);
    sendPlayerMessage (playerid, "Welcome, " + getPlayerName (playerid) + "! Use /help to get started.", COLOR_YELLOW );
    setPlayerSpawnLocation (playerid, 58.488483, 1115.379395, 3.166998, 325.00);
    setCameraBehindPlayer (playerid); 
    
    ResetPlayerVariables (playerid);
    
    CheckUserStatus (playerid);
    
    triggerClientEvent(playerid, "ScrollBars");
    
    return 1;
}

addEvent("playerConnect", onPlayerConnect);

